Skip to content

fix(cli): wrap long approval shell commands - #537

Merged
liruifengv merged 2 commits into
mainfrom
fix/approval-long-shell-command-wrap
Jun 8, 2026
Merged

fix(cli): wrap long approval shell commands#537
liruifengv merged 2 commits into
mainfrom
fix/approval-long-shell-command-wrap

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue. This is a focused bug fix for a CLI approval UI problem found during manual testing.

Problem

Long single-line shell commands in approval prompts were truncated to one visible line, so users could not inspect the full command before approving it.

What changed

Wrap shell command blocks in approval prompts with ANSI-aware wrapping while preserving real multi-line command rendering. Added a regression test for a long single-line command and included a patch changeset for the CLI.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Testing

  • Passed: pnpm --filter @moonshot-ai/kimi-code exec vitest run test/tui/components/dialogs/approval-panel.test.ts
  • Passed: pnpm exec oxlint --type-aware apps/kimi-code/src/tui/components/dialogs/approval-panel.ts apps/kimi-code/test/tui/components/dialogs/approval-panel.test.ts
  • Note: pnpm --filter @moonshot-ai/kimi-code typecheck currently fails on existing unrelated packages/agent-core/src/utils/proxy.ts typing errors for undici / socks.

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f9cf547

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 8, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@f9cf547
npx https://pkg.pr.new/@moonshot-ai/kimi-code@f9cf547

commit: f9cf547

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@liruifengv
liruifengv merged commit 8d0c91f into main Jun 8, 2026
8 checks passed
@liruifengv
liruifengv deleted the fix/approval-long-shell-command-wrap branch June 8, 2026 07:06
@github-actions github-actions Bot mentioned this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant